package com.yfqy.admin.domain.mapper;

import com.yfqy.admin.domain.dto.product.ProductQuery;
import com.yfqy.admin.domain.dto.product.ProductSpuDTO;
import com.yfqy.admin.domain.entity.ProductSpu;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProductSpuMapper {
    int deleteByPrimaryKey(Long id);

    int insert(ProductSpu record);

    int insertSelective(ProductSpu record);

    ProductSpu selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ProductSpu record);

    int updateByPrimaryKey(ProductSpu record);

    Long selectOneSpuByName(@Param("spuName") String spuName);

    List<ProductSpuDTO> selectPageListByCondition(@Param("query") ProductQuery productQuery);

    ProductSpuDTO selectSpuDTOById(@Param("id") Long id);

    int updateStatus(@Param("id") Long id, @Param("status") Byte status, @Param("modifiedBy") Long modifiedBy);

    List<ProductSpu> selectSpuNameBySpuIds(@Param("spuIds") List<Long> spuIds);
}